package org.demo.patten.mediator;

/**
 * @author zhuj
 * @date 2025/3/29
 * @apiNote
 */
public class ConcreteUser extends User{
    public ConcreteUser(String name, ChatRoomMediator mediator) {
        super(name, mediator);
    }
    @Override
    public void send(String message) {
        System.out.println(name + " 发送消息: " + message);
        mediator.sendMessage(message, this);
    }
    @Override
    public void receive(String message) {
        System.out.println(name + " 收到消息: " + message);
    }
}
